package com.newenergy.wisehome.common.helper;

import android.util.Log;

/**
 * Created by dell on 2016/11/29.
 */

public class LogHelper {

    public static boolean isShow() {
        return isShow;
    }

    public static void setShow(boolean show) {
        isShow = show;
    }

    public static String TAG ="QBH";
    public static boolean isShow = true;

    public static void setLEVEL(int LEVEL) {
        LogHelper.LEVEL = LEVEL;
    }

    public static int LEVEL = 1;
    public static int VERBOSE = 1;
    public static int DEBUG = 2;
    public static int INFO = 3;
    public static int WRAN = 4;
    public static int ERROR = 5;

    public static void v(String message) {
        if(isShow() && VERBOSE>=LEVEL){
            Log.v(TAG, message);
        }
    }

    public static void v(String tag,String message) {
        if(isShow() && VERBOSE>=LEVEL){
            Log.v(tag, message);
        }
    }

    public static void d(String message) {
        if(isShow() && DEBUG>=LEVEL){
            Log.d(TAG, message);
        }
    }

    public static void d(String tag,String message) {
        if(isShow() && DEBUG>=LEVEL){
            Log.d(tag, message);
        }
    }
    public static void i(String message) {
        if(isShow() && INFO>=LEVEL){
            Log.i(TAG, message);
        }
    }
    public static void i(String tag,String message) {
        if(isShow() && INFO>=LEVEL){
            Log.i(tag, message);
        }
    }

    public static void w(String message) {
        if(isShow() && WRAN>=LEVEL){
            Log.w(TAG, message);
        }
    }
    public static void w(String tag,String message) {
        if(isShow() && WRAN>=LEVEL){
            Log.w(tag, message);
        }
    }

    public static void e(String message) {
        if(isShow() && ERROR>=LEVEL){
            Log.e(TAG, message);
        }
    }

    public static void e(String tag,String message) {
        if(isShow() && ERROR>=LEVEL){
            Log.e(tag, message);
        }
    }
}
